Test your skills through the online practice test: EJB Quiz Online Practice Test

Related differences

EJB 1.0 vs EJB 2.0EJB 2.0 vs EJB 3.0EJB 3.0 vs Spring
JavaBeans vs EJB

Ques 36. What is connection pooling feature of EJB container?

Connection pooling is one of the Advance feature of container which enhanced our application performance .Using connection pooling mechanism client are not required to create every time connection object to interact with database .Here in pool objects are already available Whenever a client request for a database connection then an instance is picked from the connection pool to get an access to database and when user complete with his work instance is returned to connection pool. There is a limit specified by App server administrator for the availability of number of connections and beyond a specified limit a predefined number increases numbers of connection pool instances. When demand goes back to normal then access amount of connection pool instances are removed.

Is it helpful? Add Comment View Comments
 

Ques 37. What is Session facade?

Session Façade is one of the design pattern which is used in EJB component in this pattern session beans are used as a wrapper classes for entity bean and using session bean we interact with Entity bean .it will give clean approach towards client access to bean components and also reduce network calls so as to make the whole system of high performance.

Is it helpful? Add Comment View Comments
 

Ques 38. What are the transaction Attribute?

Transaction is group of operation or work which should be performed either completely or none to maintain the data integrity. All transaction must have ACID property(atomicity ,consistency,integrity,durability) so transaction can be said completed if we commit on successful execution and rollback on unsuccessful execution.
There are two ways of transaction management.
· Declarative Transaction Mang.
· Programmatic Transaction Mang.
Now we see what the transactions Attribute are
Transaction Attribute conveys to the container the intended transactional behavior of the associated EJB component's method.

Required: if required attribute is associated with Method then new Transaction context may or may not be created, means if method is already associated with transaction context then no new transaction context should be created.

Requires New: if Requires New attribute is associated with Method then always new Transaction context may be created.

NotSupported:if Method is Associated with this Attribute then method is a not a part of transaction.

Supported:if a Method is Associated with this transaction Attribute then method will act as Not supported if calling component is not associated with transaction and if calling component is associated with transaction then act as a required Attribute.

Mandatory:if a method is Associated with this attribute then always be called from calling component transaction context.

Never: if a method is Associated with this attribute then never be called from calling component transaction context.
The default transaction value for EJB is Support.

Is it helpful? Add Comment View Comments
 

Ques 39. Difference Between ejbStore() and ejbLoad()?

Both of these methods are used in context of entity bean for the purpose of synchronizing the instance variable to corresponding value store in the database. ejbLoad method load or refresh the instance variable from the database and ejbStore method writes variables value back to the database.

Is it helpful? Add Comment View Comments
 

Ques 40. What is the difference between JNDI context, Initial context, session context and ejb context?

JNDI context: provides mechanism to lookup resources on network.

Initial Context: it provides initial context to resources.

Session Context:it has all the information available which is required to session bean from container.

EjbContext:it contain information which is required to both session and entity bean.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: